package solution12;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int num = sc.nextInt();
            String s = new Solution().intToRoman(num);
            System.out.println(s);
            System.out.println(new solution13.Solution().romanToInt(s));
        }
    }
}
